<?php

namespace common\models\log;

use Yii;

/**
 * This is the model class for table "log_message".
 *
 * @property int $id
 * @property int $type 类型【1微信、2钉钉】
 * @property string $send_title 消息标题
 * @property string|null $send_data 消息参数
 * @property string|null $send_result 消息结果
 * @property int $created_at 创建时间
 * @property int $updated_at 更新时间
 */
class LogMessage extends \common\models\base\BaseModel
{
    const TYPE_WECHAT = 1;
    const TYPE_DINGTALK = 2;

    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'log_message';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['type', 'created_at', 'updated_at'], 'integer'],
            [['send_data', 'send_result'], 'safe'],
            [['send_title'], 'string', 'max' => 32],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'type' => '类型【1微信、2钉钉】',
            'send_title' => '消息标题',
            'send_data' => '消息参数',
            'send_result' => '消息结果',
            'created_at' => '创建时间',
            'updated_at' => '更新时间',
        ];
    }
}
